package com.zyh.kafka.day03;

import com.zyh.kafka.util.KafkaProducerUtils;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.serialization.StringSerializer;

import java.util.Properties;

public class KafkaProducerTest3 {
    public static void main(String[] args) {
        Properties producerConfigs = new Properties();
        producerConfigs.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,"kafka24:9092");
        producerConfigs.setProperty(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
        producerConfigs.setProperty(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());

    }
}
